/* initComponent的单例模式，用于ram模式下模拟init、update的触发 */
import { InitComponent } from "../index";
import { ModelType } from "@/types/model";
import { invoke } from "./devRequest";

const devRamModel: ModelType = {
  invoke,
};

export class InitComponentSingleton {
  private static instance: InitComponent | null = null;
  private constructor() {}
  public static getInstance(): InitComponent {
    if (this.instance === null) {
      this.instance = new InitComponent(devRamModel);
    }
    return this.instance;
  }
}
